<template>
    <div class="table_header">
        <div class="table_header_btn_group">
            <el-button
                v-auth="'commodity_category:add'"
                type="primary"
                @click="$emit('add')"
                :disabled="props.isParentDisabled">
                新增类目
            </el-button>
        </div>
        <div class="table_header_label">
            <div class="table_header_label_left">类目</div>
            <div class="table_header_label_right">操作</div>
        </div>
    </div>
</template>

<script setup>
const props = defineProps({
    isParentDisabled: { type: Boolean, default: false }
});
</script>
<style lang="scss" scoped>
.table_header_btn_group {
    margin-bottom: 16px;
}
.table_header_label {
    display: flex;
    justify-content: space-between;
    height: 48px;
    line-height: 48px;
    padding: 0 24px;
    border: 1px solid #ebeef5;
    border-bottom: none;
    background: #f9f9f9;
    font-size: 14px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #33302d;
    .table_header_label_right {
        width: 205px;
        text-align: center;
    }
}
</style>
